<?php

//Selectionne un ou plusieurs commentaires 
function selectComments($bdd) {
    $req = $bdd->query('SELECT * FROM comments ORDER BY date_hour ');
    return $req;
}

//Selectionne un commentaire
function selectOneComment($bdd, $id) {
    $req = $bdd->query('SELECT * FROM comments WHERE id_comment=' . $id);
    return $req;
}

//Supprime un commentaire
function deleteComment($bdd, $id) {
    $bdd->query("DELETE 
            FROM comments  
	    WHERE id_comment = '$id'");
   
}
?>